package com.leezhen.commons.config;

import com.netflix.loadbalancer.AvailabilityFilteringRule;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;

public class MyLoadBalanceConfig {

    @Bean
    public IRule ribbonRule() { // 其中IRule就是所有规则的标准
        return new RandomRule();
//        return new AvailabilityFilteringRule();
    }

}
